Finding variable names of encrypted DXL scripts

Hey all, ever wondered how the variable name of some global in an encrypted library or DXL script was named? If you know, that the variable is set by a perm (e.g. a dialog box element) you can make DXL give the variable name away, by 'unsetting' the variable:
 

DBE toggleOld (DB x, string s, bool v) {  return toggle(x,s,v) }
DBE toggle (DB x, string s, bool v) { 
   int d1,d2
   // lets look for a toggle that contains the word 'filter'
   if (findPlainText(s, "filter", d1, d2, false)) { 
      // return the magic 'not assigned' value ...
      return ((addr_ (-2023406815)) DBE) 
   }
   return toggleOld(x,s,v)
}
 
#include <standard/compwizard/compwiz.dxl>

 


Gives you the message:

 

 

-R-E- DXL: <standard/compwizard/compwiz6.inc:126> unassigned variable (filterOpt)



For other cases you might resort to DXL tracing. Maybe this helps someone. Regards, Mathias



 

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

 


Mathias Mamsch - Thu Sep 06 04:54:04 EDT 2012

Re: Finding variable names of encrypted DXL scripts
SystemAdmin - Wed Feb 06 04:36:17 EST 2013

Nice trick!

I've used that method of 'repurposing' perms, but not invoked errors by the magic unassigned value.

Thanks for shareing